package edu.neu.csye6200;

public class NoEnoughPapersException extends Exception {
    private final String studentName;
    private final int desiredQuantity;
    private final int availableQuantity;

    public NoEnoughPapersException(String studentName, int desiredQuantity, int availableQuantity) {
        this.studentName = studentName;
        this.desiredQuantity = desiredQuantity;
        this.availableQuantity = availableQuantity;
    }

    @Override
    public String getMessage() {
        return "学生 " + studentName + " 希望选论文 " + desiredQuantity + " 篇，但目前只有 " + availableQuantity + " 篇可选";
    }
}    